package jgl.vajra.management.widget.dialogfragment;

import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;

import jgl.vajra.management.R;
import jgl.vajra.management.databinding.DialogFragmentGrabAuthBinding;
import jgl.vajra.management.listener.MessageDlialogListener;

public class GrabAuthDialogFragment extends BaseDialogFragment<DialogFragmentGrabAuthBinding> {
    private MessageDlialogListener listener;

    @Override
    public int getLayoutRes() {
        return R.layout.dialog_fragment_grab_auth;
    }

    @Override
    public void initView(Context context, View rootView, AttributeSet attrs) {
        mBinding.setView(this);
    }

    @Override
    public void initData(Context context) {
    }

    @Override
    public void initEvent(Context context) {

    }

    @Override
    public void dismiss() {
        super.dismiss();
    }

    public void onNegative() {
        dismiss();
        listener.onLeftClick();
    }

    public void onPositive() {
        dismiss();
        listener.onRightClick();
    }

    @Override
    public int getGravity() {
        return Gravity.CENTER;
    }


    public void setMessageDialogListener(MessageDlialogListener listener) {
        this.listener = listener;
    }

}
